import { app, BrowserWindow, globalShortcut } from "electron";
let win: BrowserWindow;

app.on('ready', () => {
  win = new BrowserWindow({
    frame: false,
    show: false,
    minHeight: 650,
    minWidth: 1000,
    webPreferences: {
      nodeIntegration: true,
      contextIsolation: false,
      webSecurity: false,
      enableRemoteModule: true,
    }
  })
  win.on('ready-to-show', () => {
    win.show()
  })
  win.loadFile("./index.html").catch(e => {
    console.log(e)
  })
  win.webContents.openDevTools()

})

app.on('window-all-closed',()=>{
  globalShortcut.unregisterAll()
})